<%@ Page Language="VB" MasterPageFile="~/Default.master" AutoEventWireup="false" CodeFile="View.aspx.vb" Inherits="Poll_View" title="Untitled Page" %>
<%@ Register TagPrefix="Club" TagName="LoginBanner" Src="~/usercontrols/LoginBanner.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div id="body">
        <Club:LoginBanner ID="LoginBanner1" runat="server" />        
    <div class="fullwidth">
        <Club:PollControl ID="PollControl1" runat="server" />
    </div>
    <div class="fullwidth">
        <h4>Poll reactions:</h4>
            <div class="dashedline">
            </div>
            <asp:LinkButton ID="AddReactionLink1" runat="server" OnClick="PollLink_Click" Text="Add reaction"></asp:LinkButton><br /><br />
            <asp:Repeater ID="Repeater1" runat="server" EnableViewState="true">
                    <HeaderTemplate>
                        <table width="100%" cellpadding="0" cellspacing="0">
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td class="thread" valign="top" width="130" rowspan="2">
                                <h3>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ClubStarterKit.Web.Members.FirstAndLastName(Eval("userid")) %>'></asp:Label></h3>
                                    <asp:Image ID="Image2" runat="server" ImageUrl='<%# "~/usercontrols/AvatarImagefetch.ashx?Memberid=" + Eval("userid").ToString() %>' />
                            </td>
                            <td colspan="2" class="thread" valign="bottom">
                                <asp:Label ID="CreatedOnLabel" runat="server" Text='<%# Eval("creationdate") %>'></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div class="msgbody">
                                    <asp:Label ID="Labelbody" runat="server" Text='<%# Eval("reaction") %>'></asp:Label></div>
                            </td>
                        </tr>
                        <tr>
                            <td class="threadcontrols">
                            &nbsp;</td>
                            <td class="threadcontrols" colspan="2" align="right">
                                &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" OnClick="DeleteButton_Click" CommandArgument='<%# Eval("reactionId") %>' Visible='<%# IsAdmin() %>'>Delete Reaction</asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <SeparatorTemplate>
                    </SeparatorTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater> <br />
                <asp:LinkButton ID="AddReactionLink2" runat="server" OnClick="PollLink_Click" Text="Add Reaction"></asp:LinkButton>
                <div class="dashedline">
                </div>
    </div>
</div>
</asp:Content>